<?php
/* 
    Project     : 48c6c450f1a4a0cc53d9585dc0fee742
    Created on  : Mar 16, 2013, 11:29:15 PM
    Author      : Truong Khuong - khuongxuantruong@gmail.com
    Description :
        Purpose of the stylesheet follows.
*/
class product_model extends CI_Model {

    function __construct()
    {
        parent::__construct();
    }
    
    function getProductById($id=0){
		return $this->db
				->select("
					SQL_CALC_FOUND_ROWS 
						product.product_id,
						product.product_title,
						product.product_title_vi,
						product.product_alias,
						product.product_code,
						product.product_sizes,
						product.product_colors,
						product.product_price,
						product.product_price_vi,
						product.product_status,
						product.product_position,
						product.product_category_id,
						product.product_total_amount,
						product.product_amount,
						product.product_thumb,
						product.product_tag,
						product.product_insert,
						product.product_update,
						product.product_type
				",false)
				->where('product_id',$id)
				->where('product_amount >',0)
				->where('product_status','true')
				->get('product')
				->row();
	}
}
